
"""
    自定义搜索类
"""

from django_filters import rest_framework


class DoctorsFilter(rest_framework.FilterSet):
    """
        start_date: 开始日期时间
        end_date: 结束日期时间
    """
    start_date = rest_framework.DateTimeFilter(field_name='time', lookup_expr='gte')
    end_date = rest_framework.DateTimeFilter(field_name='time', lookup_expr='lte')